]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
authPrompt: Only wiggle the entry on failures coming from the querying service
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Mon, 1 Feb 2021 18:39:03 +0000 (19:39 +0100)
committerRay Strode <halfline@gmail.com>
Mon, 15 Feb 2021 16:58:50 +0000 (16:58 +0000)
Currently whenever an authentication failure happens we wiggle the
entry, however this may not be related to the service which failed.

For example if the fingerprint authentication failed for whatever reason,
there's no point to wiggle the text input as it's something unrelated to it.

So, only apply the wiggle effect to the entry in case the failure is
coming from the querying service.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1652>

js/gdm/authPrompt.js

index 4aba39f36de4858fc2f6b21f6e81f622a5f602ed..95f07a6a3f177ee8f6490846b1f95157bd319005 100644 (file)
@@ -279,6 +279,7 @@ var AuthPrompt = GObject.registerClass({
     }
 
     _onVerificationFailed(userVerifier, serviceName, canRetry) {
+        const wasQueryingService = this._queryingService === serviceName;
         this._queryingService = null;
         this.clear();
 
@@ -286,7 +287,8 @@ var AuthPrompt = GObject.registerClass({
         this.setActorInDefaultButtonWell(null);
         this.verificationStatus = AuthPromptStatus.VERIFICATION_FAILED;
 
-        Util.wiggle(this._entry);
+        if (wasQueryingService)
+            Util.wiggle(this._entry);
     }
 
     _onVerificationComplete() {